#ifndef EXTFONT_H_
#define EXTFONT_H_

// By: Jesse Guarascia de Urena
// External Font file
// Uses TTF_Fonts to load and render fonts

#include <SDL_ttf.h>
#include "Asset.h"
#include "Color.h"
#include "Render.h"
#include "DebugSys.h"

class ExtFont : public Asset
{
private:
	TTF_Font *font; // Underlying external font

	void DeleteFont(); // Delete the font

public:
	ExtFont(void);
	~ExtFont(void);

	// Load the font file
	bool LoadFont(std::string file, int pointSize = 16);

	// Render the given text
	void Render(std::string text, float x, float y, Color color);
	void Render(std::string text, Rect rect, Color color);

	// Create a text surface
	SDL_Surface *GetTextSurface(std::string text, Color color);

	// Debug the font
	std::string Debug();
};

#endif // EXTFONT_H_